package forecasting.converter;


public abstract class FeatureType {
	public String name;
	
	public FeatureType() {}
	public FeatureType(String name) {
		name.trim();
		this.name = name;
	}
	
	public static FeatureType createValue(final String name, final String val) {
		if (val.length() == 0) {
			return new UnknownValue(name);
		} else if(RealValue.isReal(val)) {
			return new RealValue(name, RealValue.convertToDouble(val));
		} else {  
			return new DiscreteValue(name);
		}
	}
	
	public String getName() {
		return name;
	}
	
	public String toString() {
		return "@Attribute ";
	}
	
}
